spinbutton: Use right state when querying padding
authorBenjamin Otte <otte@redhat.com>
Fri, 6 Nov 2015 17:49:26 +0000 (18:49 +0100)
committerBenjamin Otte <otte@redhat.com>
Fri, 6 Nov 2015 17:59:15 +0000 (18:59 +0100)
gtk/gtkspinbutton.c

index 7375b5f40087cb8c0512378b72f73156bb30a65a..4826f5df27cf2236f967f78d7735717060e92320 100644 (file)
@@ -966,21 +966,19 @@ gtk_spin_button_panel_get_size (GtkSpinButton *spin_button,
   GtkSpinButtonPrivate *priv = spin_button->priv;
   GtkBorder button_padding, button_border;
   GtkStyleContext *context;
-  GtkStateFlags state;
   gint icon_size, w, h;
 
   gtk_icon_size_lookup (GTK_ICON_SIZE_MENU, &w, &h);
   icon_size = MAX (w, h);
 
   context = gtk_widget_get_style_context (GTK_WIDGET (spin_button));
-  state = gtk_style_context_get_state (context);
   if (panel == priv->up_panel)
     gtk_style_context_save_to_node (context, priv->up_node);
   else
     gtk_style_context_save_to_node (context, priv->down_node);
 
-  gtk_style_context_get_padding (context, state, &button_padding);
-  gtk_style_context_get_border (context, state, &button_border);
+  gtk_style_context_get_padding (context, gtk_style_context_get_state (context), &button_padding);
+  gtk_style_context_get_border (context, gtk_style_context_get_state (context), &button_border);
 
   gtk_style_context_restore (context);